package com.selly.hanjuang.lib;

import java.util.ArrayList;

import com.selly.hanjuang.Bandrek;

import android.app.Application;

public class MyApplication extends Application {

	//String localhost = "http://10.162.59.216/hanjuang/json/";
	private String mStringValue;
	//private Bandrek bandrek;
	ArrayList<Bandrek> bandrekList = new ArrayList<Bandrek>();
	
	ArrayList<Bandrek> produkPesananList = new ArrayList<Bandrek>();
	
    @Override
    public void onCreate() {
    	super.onCreate();
        // Here you could pull values from a config file in res/raw or somewhere else
        // but for simplicity's sake, we'll just hardcode values
        mStringValue = "SavageLook.com";
    }
 
    public String getStringValue() {
        return mStringValue;
    }
 
    public void setStringValue(String value) {
        mStringValue = value;
    }

	public ArrayList<Bandrek> getBandrekList() {
		return bandrekList;
	}

	public void setBandrekList(ArrayList<Bandrek> bandrekList) {
		this.bandrekList = bandrekList;
	}


	public int getGrandTotal(){
		int grand = 0;
		for(int i=0; i<bandrekList.size(); i++){
			grand = grand + bandrekList.get(i).getTotalHarga();
		}
		return grand;
	}

	public ArrayList<Bandrek> getProdukPesananList() {
		return produkPesananList;
	}

	public void setProdukPesananList(ArrayList<Bandrek> produkPesananList) {
		this.produkPesananList = produkPesananList;
	}
}
